-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade css-select from ^3.1.2
to ^4.1.3
#1485
Conversation
👋 @TrySound, are you able to review this change? |
It's worth also to upgrade it in 1.* version, because some of the projects depend on this version and it will be hard to upgrade it without breaking of API (i.e. look into gregberge/svgr#654) |
Noting that this "Resolves #1488" in the hopes that that magic phrase will close the issue when/if this get merged (I know that works if it's in the description of a PR, guess we'll find out if it works if its in a comment...) Edit: RIP me - it doesn't |
FYI the breaking changes from css-select 3.1.2 -> 4.1.2 changelog (for someone with better knowledge of this codebase to be able to more easily review):
|
@underoot This is a breaking change, as it affects CSS selectors in |
For Yarn users (in your package.json): "resolutions": {
"**/css-what": "^5.0.0"
} This should be safe to do, as it avoids any of the breaking changes introduced in |
Given that the changes are related to spec compliance (and the Though of course it's up to the SVGO maintainers to decide.
Did it for you 😉 |
^3.1.2
to ^4.1.2
^3.1.2
to ^4.1.3
svgo version 2.3.1 bumps transitive dependency css-what from 4.x to 5.x to address a ReDoS security vulnerability present in versions prior to this. (See svg/svgo/pull/1485)
@TrySound, do you have any comment in this regard? |
Resolves #1488
This updates the
css-select
dependency from^3.1.2
to^4.1.2
in order to get the transitive dependencycss-what
updated to5.0.1
, which was vulnerable to ReDoS up-to-and-including5.0.0
. Given my understanding of SVGO, this means SVGO may be vulnerable as well when provided with a carefully crafted SVG containing CSS.Alternatively,
css-select
can be set to as low as^4.0.0
in order to getcss-what
updated to an appropriate version. I just set it to^4.1.2
as that is the latest version as of opening this Pull Request.As this concerns a vulnerable dependency that is also used in the latest SVGO v1, ideally SVGO v1 should also be patched. I'm not sure what the procedure is for updating SVGO v1 though...